package com.show.mytest;

public class Test05_Lock {
    public static void main(String[] args) {
        // 创建自定义Runnable对象
        MyRunnable2 r = new MyRunnable2();
        // 创建两个线程并传入 r ,且指定线程名
        Thread t1 = new Thread(r,"小米");
        Thread t2 = new Thread(r,"小雅");
        // 开启线程
        t1.start();
        t2.start();
    }
}
